package com.lagou.homework.modulefour.third;

/*
 * @className ConsumerThreadTest
 * @description
 * @author admin
 * @date 2022/4/1 16:25
 * */
public class ConsumerThreadTest {

    public static void main(String[] args) {
        // 创建Train类型的对象
        Train t = new Train();
        // 声明Thread的类型指向子类类型的对象
        Thread t1 = new ConsumerThread(t);
        Thread t2 = new ConsumerThread(t);
        Thread t3 = new ConsumerThread(t);
        // 启动线程
        t1.start();
        t2.start();
        t3.start();
    }
}
